<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <h3>图片加载失败的解决方案</h3>
    <p>moon图片</p>
    <img class="img" src="img/moon.jpg" alt="" srcset="">
    <p>error 图片</p>
    <img  class="img"src="img/error.jpg" alt="" srcset="">
    <p>系统触发的error</p>
    <img class="img" src="img/moon1.jpg" alt="" srcset="">
    <p>尝试加载moon图片出错处理</p>
    <img class="img" src="img/moon1.jpg" onerror="handleImgLoadError1(this)" alt="" srcset="">
    <p>尝试加载moon图片出错处理,同时默认图片也加载出错处理</p>
    <img class="img" id="img777" alt="" srcset="">
    <script src="index.js"></script>
</body>
</html>